<?php

use Illuminate\Support\Facades\Route;

Route::get('/', 'Web\AppController@getApp');

Route::get('/auth/{social}', 'Web\AuthenticationController@getSocialRedirect')
    ->middleware('guest');

Route::get('/auth/{social}/callback', 'Web\AuthenticationController@getSocialCallback')
    ->middleware('guest');

Route::get('/logout', 'Web\AppController@getLogout')
    ->name('logout');


Route::get('geocode', function () {
    return \App\Utilities\GaodeMaps::geocodeAddress('三眼桥地铁站', '武汉', '湖北');
});

Route::get('regeocode', function () {
    return \App\Utilities\GaodeMaps::findClosestCity('上海', 31.23985300, 121.49974000);
});

Route::get('/cafe/{id}', 'API\CafesController@getCafe');
